package com.dt76.smallloanbackenduser.remote.lhuaw;

import com.dt76.smallloanbackenduser.hystrix.lhuaw.stationHystrix;
import com.dt76.smallloanbackenduser.pojo.lhuaw.StationLetter;
import com.dt76.smallloanbackenduser.utils.Page;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name="smallloan-backend-service",fallback = stationHystrix.class)
public interface StationLettertest {
    //站内信消息 lhuawHystrix
    @RequestMapping("/lhuaw/qryAll")
    List<StationLetter> qryAll();
    @RequestMapping("/lhuaw/getConditionPageAll")
    public Page qryStationConditionPageAll(
            @RequestParam("pageIndex") int pageIndex,
            @RequestParam("stationMessageTitle")String stationMessageTitle,
            @RequestParam("stationPublisher")String stationPublisher
    );
    //删除
    @RequestMapping("/lhuaw/delStation")
    public Result delStation(@RequestParam("stationId")int stationId);
    //新增
    @RequestMapping(value = "/lhuaw/addStation")
    Result addStation(@RequestBody StationLetter stationLetter);
    //查看
    @RequestMapping("/lhuaw/seeStation")
    public StationLetter seeStation(@RequestParam("stationId") int stationId);
//站内信消息
}
